const Router = require('koa-router')
const crawler = require('../models/crawler')
//const index = require('../controllers/index')
const router = new Router()

//路由逻辑开始
router.get('/', async (ctx) => {
    await ctx.render('index', {
        title: '首页'
    })
})

router.get('/spider/', crawler.crawler)

router.get('/crawler/', async (ctx) => {
    await ctx.render('crawler')
})

router.get('/ansylse/', async (ctx) => {
    await ctx.render('ansylse', {
        title: '结果统计分析'
    })
})

module.exports = router